import request from '@/utils/request'

// 查询户采集信息列表
export function listHu_info(query) {
  return request({
    url: '/business/hu_info/list',
    method: 'get',
    params: query
  })
}

// 查询户采集信息详细
export function getHu_info(id) {
  return request({
    url: '/business/hu_info/' + id,
    method: 'get'
  })
}

// 新增户采集信息
export function addHu_info(data) {
  return request({
    url: '/business/hu_info',
    method: 'post',
    data: data
  })
}

// 修改户采集信息
export function updateHu_info(data) {
  return request({
    url: '/business/hu_info',
    method: 'put',
    data: data
  })
}

// 删除户采集信息
export function delHu_info(id) {
  return request({
    url: '/business/hu_info/' + id,
    method: 'delete'
  })
}

// 导出户采集信息
export function exportHu_info(query) {
  return request({
    url: '/business/hu_info/export',
    method: 'get',
    params: query
  })
}

// 新增户照片信息
export function addFile(data) {
  return request({
    url: '/business/hu_info/files',
    method: 'post',
    data: data
  })
}

// 删除户照片信息
export function delFile(urls) {
  return request({
    url: `/business/hu_info/files`,
    method: 'delete',
    params: { urls: urls }
  })
}

// 查询户照片信息
export function getFile(mainId, params) {
  return request({
    url: '/business/hu_info/files/' + mainId,
    method: 'get',
    params: params
  })
}

// 更新户文件信息
export function updateFile(data) {
  return request({
    url: '/business/hu_info/files',
    method: 'put',
    data: data
  })
}

// 查询院落备选列表
export function getYuanluoOptions(params) {
  return request({
    url: '/business/layer/yuanluo_options',
    method: 'get',
    params: params
  })
}

//首页统计信息
export function getHomeStaticsInfo() {
  return request({
    url: "/business/home/statics",
    method: "get",
  })
}

//统计分析页信息
export function getAnalysisStaticsInfo() {
  return request({
    url: "/business/analysis/statics",
    method: "get",
  })
}